%% RMSE:  root mean square error
load fuzex1trnData.dat
load fuzex1chkData.dat
opt = anfisOptions('InitialFIS',4,'EpochNumber',30);

opt.ValidationData = fuzex1chkData;
[fis,trainError,stepSize,chkFIS,chkError] = anfis(fuzex1trnData,opt);

figure;
x = [1:30];
plot(x,trainError,'.b',x,chkError,'*r');

figure
plot(stepSize)